package com.usian;

import com.usian.pojo.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient(value = "provider")
@RequestMapping("user")
public interface Feign {

    //restful风格
    @RequestMapping("findById/{id}")
    public User findById(@PathVariable Integer id);


    //?问号传参
    @GetMapping("/findByIdd")
    public User findByIdd(@RequestParam Integer id);

    //复杂传参

    @PostMapping("/findByUser")
    public User findByUser(@RequestBody User user);

}
